﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UploadImage.aspx.cs" Inherits="shopxachtayphap.UploadImage" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Js/jquery-1.8.0.min.js"></script>
    <script src="js/dropzone.js"></script>
    <link href="css/dropzone.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div id="dZUpload" class="dropzone">
            <div class="dz-default dz-message">
                Drop image here. 
            </div>
            <script>
                $(document).ready(function () {
                    Dropzone.autoDiscover = false;
                    //Simple Dropzonejs 
                    $("#dZUpload").dropzone({
                        url: "SimpeFileUploader.ashx",
                        maxFiles: 5,
                        addRemoveLinks: true,
                        success: function (file, response) {
                            var imgName = response;
                            file.previewElement.classList.add("dz-success");
                            console.log("Successfully uploaded :" + imgName);
                        },
                        error: function (file, response) {
                            file.previewElement.classList.add("dz-error");
                        }
                    });
                });
            </script>

        </div>
    </form>
</body>
</html>
